home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / tex / tex31 / inputs.lzh / splain.tex < prev    next >
Text File  |  1990-06-14  |  47KB  |  1,331 lines

  1. % File SPLAIN.TEX - Originally created 11 October 1987
  2. %             - Modified June 14, 1990 by Pierre MacKay to 
  3. %        track all changes in file LPLAIN up to February 8, 1990
  4. % File LPLAIN - Created 29 October 1985 from plain version 1.5CM
  5. %             - Last modified 20 October 1988 to take into account
  6. %               changes to PLAIN.TEX reported by Arthur Ogawa
  7. %             - Modified February 8, 1990 by Dominik Wujastyk to 
  8. %               match the PLAIN.TEX meant for TeX 3.0 (\fmtname{plain}, 
  9. %               \fmtversion{3.0}).
  10. % This is the SliTeX version of the plain TeX format that's described in 
  11. % The TeXbook.  All modifications can be found by searching for
  12. % the word 'LaTeX' or 'SliTeX'.
  13. % N.B.: A version number is defined at the very end of this file;
  14. %       please change that number whenever the file is modified!
  15. % And don't modify the file under any circumstances.
  16.  
  17.  
  18. \catcode`\{=1 % left brace is begin-group character
  19. \catcode`\}=2 % right brace is end-group character
  20. \catcode`\$=3 % dollar sign is math shift
  21. \catcode`\&=4 % ampersand is alignment tab
  22. \catcode`\#=6 % hash mark is macro parameter character
  23. \catcode`\^=7 \catcode`\^^K=7 % circumflex and uparrow are for superscripts
  24. \catcode`\_=8 \catcode`\^^A=8 % underline and downarrow are for subscripts
  25. \catcode`\^^I=10 % ascii tab is a blank space
  26. \chardef\active=13 \catcode`\~=\active % tilde is active
  27. \catcode`\^^L=\active \outer\def^^L{\par} % ascii form-feed is "\outer\par"
  28.  
  29. \message{Preloading the plain format: codes,}
  30.  
  31. % We had to define the \catcodes right away, before the message line,
  32. % since \message uses the { and } characters.
  33. % When INITEX (the TeX initializer) starts up,
  34. % it has defined the following \catcode values:
  35. % \catcode`\^^@=9 % ascii null is ignored
  36. % \catcode`\^^M=5 % ascii return is end-line
  37. % \catcode`\\=0 % backslash is TeX escape character
  38. % \catcode`\%=14 % percent sign is comment character
  39. % \catcode`\ =10 % ascii space is blank space
  40. % \catcode`\^^?=15 % ascii delete is invalid
  41. % \catcode`\A=11 ... \catcode`\Z=11 % uppercase letters
  42. % \catcode`\a=11 ... \catcode`\z=11 % lowercase letters
  43. % all others are type 12 (other)
  44.  
  45. % Here is a list of the characters that have been specially catcoded:
  46. \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
  47.   \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}
  48. % (not counting ascii null, tab, linefeed, formfeed, return, delete)
  49. % Each symbol in the list is preceded by \do, which can be defined
  50. % if you want to do something to every item in the list.
  51.  
  52. % We make @ signs act like letters, temporarily, to avoid conflict
  53. % between user names and internal control sequences of plain format.
  54. \catcode`@=11
  55.  
  56. % INITEX sets up \mathcode x=x, for x=0..127, except that
  57. % \mathcode x=x+"7100, for x = `A to `Z and `a to `z;
  58. % \mathcode x=x+"7000, for x = `0 to `9.
  59. % The following changes define internal codes as recommended
  60. % in Appendix C of The TeXbook:
  61. \mathcode`\^^@="2201 % \cdot
  62. \mathcode`\^^A="3223 % \downarrow
  63. \mathcode`\^^B="010B % \alpha
  64. \mathcode`\^^C="010C % \beta
  65. \mathcode`\^^D="225E % \land
  66. \mathcode`\^^E="023A % \lnot
  67. \mathcode`\^^F="3232 % \in
  68. \mathcode`\^^G="0119 % \pi
  69. \mathcode`\^^H="0115 % \lambda
  70. \mathcode`\^^I="010D % \gamma
  71. \mathcode`\^^J="010E % \delta
  72. \mathcode`\^^K="3222 % \uparrow
  73. \mathcode`\^^L="2206 % \pm
  74. \mathcode`\^^M="2208 % \oplus
  75. \mathcode`\^^N="0231 % \infty
  76. \mathcode`\^^O="0140 % \partial
  77. \mathcode`\^^P="321A % \subset
  78. \mathcode`\^^Q="321B % \supset
  79. \mathcode`\^^R="225C % \cap
  80. \mathcode`\^^S="225B % \cup
  81. \mathcode`\^^T="0238 % \forall
  82. \mathcode`\^^U="0239 % \exists
  83. \mathcode`\^^V="220A % \otimes
  84. \mathcode`\^^W="3224 % \leftrightarrow
  85. \mathcode`\^^X="3220 % \leftarrow
  86. \mathcode`\^^Y="3221 % \rightarrow
  87. \mathcode`\^^Z="8000 % \ne
  88. \mathcode`\^^[="2205 % \diamond
  89. \mathcode`\^^\="3214 % \le
  90. \mathcode`\^^]="3215 % \ge
  91. \mathcode`\^^^="3211 % \equiv
  92. \mathcode`\^^_="225F % \lor
  93. \mathcode`\ ="8000 % \space
  94. \mathcode`\!="5021
  95. \mathcode`\'="8000 % ^\prime
  96. \mathcode`\(="4028
  97. \mathcode`\)="5029
  98. \mathcode`\*="2203 % \ast
  99. \mathcode`\+="202B
  100. \mathcode`\,="613B
  101. \mathcode`\-="2200
  102. \mathcode`\.="013A
  103. \mathcode`\/="013D
  104. \mathcode`\:="303A
  105. \mathcode`\;="603B
  106. \mathcode`\<="313C
  107. \mathcode`\=="303D
  108. \mathcode`\>="313E
  109. \mathcode`\?="503F
  110. \mathcode`\[="405B
  111. \mathcode`\\="026E % \backslash
  112. \mathcode`\]="505D
  113. \mathcode`\_="8000 % \_
  114. \mathcode`\{="4266
  115. \mathcode`\|="026A
  116. \mathcode`\}="5267
  117. \mathcode`\^^?="1273 % \smallint
  118.  
  119. % INITEX sets \uccode`x=`X and \uccode `X=`X for all letters x,
  120. % and \lccode`x=`x, \lccode`X=`x; all other values are zero.
  121. % No changes to those tables are needed in plain TeX format.
  122.  
  123. % INITEX sets \sfcode x=1000 for all x, except that \sfcode`X=999
  124. % for uppercase letters. The following changes are needed:
  125. \sfcode`\)=0 \sfcode`\'=0 \sfcode`\]=0
  126. % The \nonfrenchspacing macro will make further changes to \sfcode values.
  127.  
  128. % Finally, INITEX sets all \delcode values to -1, except \delcode`.=0
  129. \delcode`\(="028300
  130. \delcode`\)="029301
  131. \delcode`\[="05B302
  132. \delcode`\]="05D303
  133. \delcode`\<="26830A
  134. \delcode`\>="26930B
  135. \delcode`\/="02F30E
  136. \delcode`\|="26A30C
  137. \delcode`\\="26E30F
  138. % N.B. { and } should NOT get delcodes; otherwise parameter grouping fails!
  139.  
  140. % To make the plain macros more efficient in time and space,
  141. % several constant values are declared here as control sequences.
  142. % If they were changed, anything could happen; so they are private symbols.
  143. \chardef\@ne=1
  144. \chardef\tw@=2
  145. \chardef\thr@@=3
  146. \chardef\sixt@@n=16
  147. \chardef\@cclv=255
  148. \mathchardef\@cclvi=256
  149. \mathchardef\@m=1000
  150. \mathchardef\@M=10000
  151. \mathchardef\@MM=20000
  152.  
  153. % Allocation of registers
  154.  
  155. % Here are macros for the automatic allocation of \count, \box, \dimen,
  156. % \skip, \muskip, and \toks registers, as well as \read and \write
  157. % stream numbers, \fam codes, \language codes, and \insert numbers.
  158.  
  159. \message{registers,}
  160.  
  161. % When a register is used only temporarily, it need not be allocated;
  162. % grouping can be used, making the value previously in the register return
  163. % after the close of the group.  The main use of these macros is for
  164. % registers that are defined by one macro and used by others, possibly at
  165. % different nesting levels.  All such registers should be defined through
  166. % these macros; otherwise conflicts may occur, especially when two or more
  167. % more macro packages are being used at once.
  168.  
  169. % The following counters are reserved:
  170. %   0 to 9  page numbering
  171. %       10  count allocation
  172. %       11  dimen allocation
  173. %       12  skip allocation
  174. %       13  muskip allocation
  175. %       14  box allocation
  176. %       15  toks allocation
  177. %       16  read file allocation
  178. %       17  write file allocation
  179. %       18  math family allocation
  180. %       19  language allocation
  181. %       20  insert allocation
  182. %       21  the most recently allocated number
  183. %       22  constant -1
  184. % New counters are allocated starting with 23, 24, etc.  Other registers are
  185. % allocated starting with 10.  This leaves 0 through 9 for the user to play
  186. % with safely, except that counts 0 to 9 are considered to be the page and
  187. % subpage numbers (since they are displayed during output). In this scheme,
  188. % \count 10 always contains the number of the highest-numbered counter that
  189. % has been allocated, \count 14 the highest-numbered box, etc.
  190. % Inserts are given numbers 254, 253, etc., since they require a \count,
  191. % \dimen, \skip, and \box all with the same number; \count 19 contains the
  192. % lowest-numbered insert that has been allocated. Of course, \box255 is
  193. % reserved for \output; \count255, \dimen255, and \skip255 can be used freely.
  194.  
  195. % It is recommended that macro designers always use
  196. % \global assignments with respect to registers numbered 1, 3, 5, 7, 9, and
  197. % always non-\global assignments with respect to registers 0, 2, 4, 6, 8, 255.
  198. % This will prevent ``save stack buildup'' that might otherwise occur.
  199.  
  200. \count10=22 % allocates \count registers 23, 24, ...
  201. \count11=9 % allocates \dimen registers 10, 11, ...
  202. \count12=9 % allocates \skip registers 10, 11, ...
  203. \count13=9 % allocates \muskip registers 10, 11, ...
  204. \count14=9 % allocates \box registers 10, 11, ...
  205. \count15=9 % allocates \toks registers 10, 11, ...
  206. \count16=-1 % allocates input streams 0, 1, ...
  207. \count17=-1 % allocates output streams 0, 1, ...
  208. \c